|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvectorimage.VectorObject
public class VectorObject
Objects for which a GVectorObject can be constructed.
| Field Summary | |
|---|---|
static int |
OBJ_ELLIPSE
Ellipsoid object. |
static int |
OBJ_LINE
Line object. |
static int |
OBJ_RECTANGLE
Rectangular object. |
| Constructor Summary | |
|---|---|
VectorObject(int type,
java.awt.geom.Rectangle2D.Double bounds,
double rotation,
java.awt.Color color,
boolean filled)
Construct the shape. |
|
| Method Summary | |
|---|---|
boolean |
contains(double x,
double y)
See whether this object contains the point given. |
GVectorObject |
createGVectorObject()
Create a GVectorObject. |
java.awt.geom.Rectangle2D.Double |
getBounds()
Return the bounds of the shape before rotation. |
java.awt.Color |
getColor()
Return the colour this object should be drawn in. |
java.awt.geom.Point2D.Double |
getPosition()
Get position of this object (the center of the bounds). |
double |
getRotation()
Return the rotation of this object in degrees. |
int |
getType()
Return the type of object. |
boolean |
isFilled()
Return whether to fill or draw this object. |
void |
setBounds(java.awt.geom.Rectangle2D.Double bounds)
Set the bounds of the shape before rotation. |
void |
setPosition(java.awt.geom.Point2D.Double p)
Set position of this object (the center of the bounds). |
void |
setRotation(double rotation)
Set rotation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OBJ_RECTANGLE
public static final int OBJ_ELLIPSE
public static final int OBJ_LINE
| Constructor Detail |
|---|
public VectorObject(int type,
java.awt.geom.Rectangle2D.Double bounds,
double rotation,
java.awt.Color color,
boolean filled)
| Method Detail |
|---|
public int getType()
public java.awt.geom.Rectangle2D.Double getBounds()
public java.awt.geom.Point2D.Double getPosition()
public void setPosition(java.awt.geom.Point2D.Double p)
public double getRotation()
public java.awt.Color getColor()
public boolean isFilled()
public void setRotation(double rotation)
public void setBounds(java.awt.geom.Rectangle2D.Double bounds)
public GVectorObject createGVectorObject()
public boolean contains(double x,
double y)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||